]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
gdm/util: Reduce the fprintd proxy wait timeout
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Tue, 12 Apr 2022 15:05:02 +0000 (17:05 +0200)
committerMarco Trevisan (Treviño) <mail@3v1n0.net>
Wed, 28 Feb 2024 21:12:03 +0000 (22:12 +0100)
Given that this may lead to the shell to hang on gdm startup, and that
we expect the service to be up and running quickly, we can safely set a
5 seconds timeout instead of using the longer GLib proxy defaults.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2267>

js/gdm/util.js

index 83912b73494bd088f9db545bf9b3e032ab54e7b5..97df6d687e5d3cc9d0afb418cb899c1811ab7c93 100644 (file)
@@ -43,6 +43,7 @@ export const DISABLE_USER_LIST_KEY = 'disable-user-list';
 
 // Give user 48ms to read each character of a PAM message
 const USER_READ_TIME = 48;
+const FINGERPRINT_SERVICE_PROXY_TIMEOUT = 5000;
 const FINGERPRINT_ERROR_TIMEOUT_WAIT = 15;
 
 /**
@@ -358,6 +359,10 @@ export class ShellUserVerifier extends Signals.EventEmitter {
                 // option, so go ahead a synchronously look for a fingerprint device
                 // during startup or default service update.
                 fprintManager.init(null);
+                // Do not wait too much for fprintd to reply, as in case it hangs
+                // we should fail early without having the shell to misbehave
+                fprintManager.set_default_timeout(FINGERPRINT_SERVICE_PROXY_TIMEOUT);
+
                 const [devicePath] = fprintManager.GetDefaultDeviceSync();
                 this._fprintManager = fprintManager;